package com.mb.app.service.impl;


import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.mb.app.dao.TbCouponControlMapper;
import com.mb.app.domain.TbCouponControl;
import com.mb.app.service.ITbCouponControlService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 优惠卷控制  服务实现类
 * </p>
 *
 * @author liliping
 * @since 2019-05-23
 */
@Slf4j
@Service
public class TbCouponControlServiceImpl extends ServiceImpl<TbCouponControlMapper, TbCouponControl> implements ITbCouponControlService {

    @Override
    public List<TbCouponControl> queryList(Map<String, Object> map) {
        return this.baseMapper.lst(map);
    }

    @Override
    public int count(Map<String, Object> map) {
        return this.baseMapper.count(map);
    }

    @Override
    public int update(TbCouponControl couponControl) {
         log.info("couponControl:"+couponControl);
        return this.baseMapper.updateById(couponControl);
    }

    @Override
    public TbCouponControl getDtl(long id) {
        return this.baseMapper.getCouponControl(id);
    }
}
